<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        const arr = [5, 7, 2, 3, 6];


        // const iterator = arr[Symbol.iterator]();
        // let result = iterator.next();
        // while (!result.done) {
        //     const item = result.value; //取出数据
        //     console.log(item);
        //     //下一次迭代
        //     result = iterator.next();
        // }

        for (const item of arr) {
            console.log(item)
        }
    </script>
</body>

</html>